import java.util.Scanner;

/**
 * Created with IntelliJ IDEA.
 * Description: 打印数字的每一位
 * Author:  LiuTao
 * Version: 1.0
 * Date:    2023-04-18  19:14
 */
public class Test7 {
    public static void print(int n) {
        if(n < 10) {
            System.out.println(n);
            return ;
        }else {
            print(n / 10);
            System.out.println(n % 10);
        }
    }
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        int n = scanner.nextInt();
        print(n);
        scanner.close();
    }
}
